﻿using System;
using System.Globalization;
using System.Windows.Data;
using Poet.Views;

namespace Poet.Converters
{
    public class DocumentViewToStringConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var documentView = value as DocumentView;
            return documentView != null ? documentView.Title : null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
